package com.dapeis.web.admin.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.ag.core.base.Pager;
import com.dapeis.service.RequirementService;

@Controller
@RequestMapping("/admin/requirement")
public class AdminRequirementController extends AdminController {

    @Resource
    RequirementService requirementService;

    @RequestMapping("/list")
    public String userList(
	    @RequestParam(value = "pager", required = false) Pager pager,
	    Map<Object, Object> model, RedirectAttributes attr) {
	if (null == pager) {
	    pager = new Pager();
	}
	requirementService.pager(pager);
	model.put("pager", pager);
	return doPackageURI("requirement/list");
    }
}
